<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" />
	
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/scripts/jquery-1.8.2.min.js"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/scripts/jquery-ui-1.8.23.custom.min.js"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/scripts/jquery.wymeditor.js"></script>
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/scripts/app.js"></script>
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div id="wrapper">

	<div id="header">
		<h1><?php echo CHtml::encode(Yii::app()->name); ?></h1>
	</div>

	<div id="menu">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
				array('label'=>'Posts', 'url'=>array('/items/display/posts')),
				array('label'=>'Products', 'url'=>array('/items/display')),		
				array('label'=>'Contact', 'url'=>array('/site/contact'))
			),
		)); ?>
		
		<?php Yii::app()->controller->renderFile(Yii::app()->basePath.'/views/site/_search.php'); ?>
	</div>

	<div id="sidebar">
		<div id="feed">
			<!-- <a class="feed-button" href="#">&nbsp;</a> -->
		</div>
		<ul>
			<?php 
				//Tao Product moi
				$product = new Product();
				//lay tat ca Cate trong database
				$cates = $product->getCates();
				// loop quan Cates array de lay thong tin in ra html
				foreach ($cates as $c){
				
			?>
			<li><?php echo CHtml::link($c->name,array('items/display/cate&id='.$c->id));?></li>
			<?php }?>
		</ul>
		<div id="sidebar-bottom">
			&nbsp;
		</div>
	</div>

	<div id="content">
		<div>
			<?php if(isset($this->breadcrumbs)):?>
				<?php $this->widget('zii.widgets.CBreadcrumbs', array(
					'links'=>$this->breadcrumbs,
				)); ?><!-- breadcrumbs -->
			<?php endif?>
		</div>
		<div class="entry">
			<?php echo $content; ?>
			<!-- <div class="entry-title"><a href="#">Lorem Ipsum</a></div>
			<div class="date">Posted on 30 November 2006</div>
			<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p> <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
			<div class="comments"><a href="#">3 comments</a></div> -->
		</div>
	</div>

	<div id="footer">
		<div id="footer-valid">
		Copyright &copy; <?php echo date('Y'); ?> by Nha Yen Viet.<br/>
		All Rights Reserved.<br/>
		</div>
		<?php //echo Yii::powered(); ?>
		<!-- <div id="footer-valid">
			<a href="http://validator.w3.org/check/referer">xhtml</a> / <a href="http://www.ginger-ninja.net/">ginger ninja!</a>
		</div> -->
	</div>

</div>

</body>
</html>
